from likeshop_api_project.base.myBase import Tools


class getGoodsList_model(Tools):
    path = '/api/goods/getGoodsList'

    # 发送查询任务接口
    def getGoodsLis_action(self, category_id, keyword, sales_sum, price,hd):
        data = {
            'category_id': category_id,
            'keyword': keyword,
            'sales_sum': sales_sum,
            'price': price
        }
        getGoodsLis = self.huihua.get(url=self.hosturl + self.path, headers=hd)

        return getGoodsLis.json()



# from likeshop_api_project.api.login_api import login_model
# import requests
#
# s = requests.session()
# login = login_model(huihua=s)
# msg = login.login_action(account='17612345678', pwd='admin123', client='4')
# print(msg)
# tokena = msg['data']['token']
# hd = {
#     'token': tokena
# }
# print(hd)
#
# getGoodsLis = getGoodsList_model(huihua=s)
# msg = getGoodsLis.getGoodsLis_action(category_id=0,  keyword='', sales_sum='', price= '',hd=hd)
# print(msg)
